#include<bits/stdc++.h>
using namespace std;
int t,n[15],a[12][200005];
int main()
{
	freopen("color.in","r",stdin);
	freopen("color.out","w",stdout);
	cin>>t;
	for(int i=1;i<=t;i++)
	{
		cin>>n[i];
		for(int j=1;j<=n[i];j++)
		{
			cin>>a[i][j];
		}
	}
	for(int i=1;i<t;i++)
	{
		cout<<"0"<<endl;
	}
	cout<<"0";
	return 0;
}
